import { dataServer, directerServer, scenceServer } from "./serverLib";

/** 导演服务 */

// 玩家加入事件
directerServer?.onPlayerAdd(playerEntity => {
    const player = playerEntity.player;
    playerEntity.data = dataServer.initPlayerData(player.UserId);//初始化玩家数据
    directerServer.syncPlayerEntity(playerEntity);//同步玩家
    scenceServer.load({ scenceId: "test" });//加载玩家的进度场景 以后需要修改为玩家选择场景

})

directerServer?.onPlayerRemoving(player => {

})

